﻿@using System.Data
@using ZoomLa.Common
@using ZoomLa.BLL
@model ZoomLa.SQLDAL.SQL.PageSetting
@{
    Model.cols = 7;
    Model.url = "AdPlan";
}
@functions{
    public string SetZoomName(int id)
    {
        return B_ADZone.getAdzones(id).ZoneName;
    }
    public string LnkFiles(string files)
    {

        if (files == "")
        {
            return "暂无附件";
        }
        else
        {
            return "<a target='_blank'  href='" + files + "' title='点击下载'>下载</a>";
        }
    }
}
<div id="EGV" class="adplan">
    <table class="table table-striped table-bordered table-hover text-center">
        @if (Model.itemCount > 0)
        {
            <tr><th width="3%">ID</th><th width="8%">版位名称</th><th width="8%">投放时间</th><th width="10%">计划费用</th><th width="10%">广告附件</th><th width="7%">申请时间</th><th width="10%">操作</th></tr>
            foreach (DataRow dr in Model.dt.Rows)
            {
                <tr>
                    <td>@dr["ID"]</td>
                    <td>@SetZoomName(DataConverter.CLng(dr["ADID"]))</td>
                    <td>@DataConverter.CDate(dr["Ptime"]).ToString("yyyy/MM/dd")</td>
                    <td>@DataConverter.CDouble(dr["Price"]).ToString("F2")</td>
                    <td>@MvcHtmlString.Create(LnkFiles(dr["Files"].ToString()))</td>
                    <td>@DataConverter.CDate(dr["time"]).ToString("yyyy/MM/dd")</td>
                    <td>
                        <a href="AdPlanAdd?id=@dr["ID"]">修改</a>
                        <a href="javascript:;" onclick="mvcpage.del({id:@dr["ID"],url:'AdPlan_Del',confirm:'确定要取消申请吗'})">取消申请</a>
                    </td>
                </tr>
            }
            @Html.Partial("_page", Model)
        }
        else
        {
            <tr><td colspan="7">无相关信息!!</td></tr>
        }
    </table>
</div>